package com.scalar.forecast.projectSetup.actionCommands;

import com.scalar.forecast.commons.Constants;
import com.scalar.forecast.actionCommands.ActionCommand;

/**
 * Returns the Action Command Instance based on the action value passed
 *
 * Created by Veeru. 
 * Date: Feb 10, 2005
 * Time: 4:28:44 PM 
 */

public class ProjectSearchActionCommandFactory implements Constants {

    public static ActionCommand getActionCommand( String action ) {

        if ( ACTION_LIST.equalsIgnoreCase( action ) ) {
            return new ProjectListCommand();
        }
        if ( ACTION_SEARCH.equalsIgnoreCase( action ) ) {
            return new ProjectSearchCommand();
        }
        if ( ACTION_NEXTPAGE.equalsIgnoreCase( action ) ) {
            return new ProjectSearchDisplayPageCommand();
        }
        return null;
    }
}
